import turtle


def up_goto(pos):
    turtle.up()
    turtle.goto(pos)
    turtle.down()


def draw():
    for point in points:
        up_goto(point.get('pos'))
        turtle.dot(50,point.get('color'))
    up_goto([0, 0])


def func_click(x, y):
    if x > 230:
        for point in points:
            if y > point['pos'][1] - 25 and y < point['pos'][1] + 25:
                turtle.pencolor(point['color'])
    else:
        turtle.goto(x, y)


def func_press_up():
    turtle.up()


def func_press_down():
    turtle.down()


points = [{"pos": [260, 260], "color": 'green'},
          {"pos": [260, 185], "color": 'red'},
          {"pos": [260, 110], "color": 'blue'},
          {"pos": [260, 35], "color": 'yellow'}]
draw()
turtle.onscreenclick(func_click, 1)
turtle.onkeypress(func_press_up, 'Up')
turtle.onkeypress(func_press_down, 'Down')
turtle.listen()
turtle.done()
